package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @Description: 出入库过账拒绝记录
 * @Author: MxpIO
 * @Date:   2021-10-18
 * @Version: V1.0
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_STOCK_REJECT_HISTORY")
@Schema(description="出入库过账拒绝记录")
public class EquipmentStockRejectHistory extends BaseEntity {
    private static final long serialVersionUID = 1L;

	/**id*/
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;
	/**isDel*/
    @Column(name = "IS_DEL_")
    @Schema(description = "isDel")
    private Integer isDel;
	/**版本*/
    @Column(name = "VERSION_")
    @Schema(description = "版本")
    private Integer version;
	/**主表ID*/
    @Column(name = "APPLY_ID_")
    @Schema(description = "主表ID")
    private String applyId;
	/**拒绝原因*/
    @Column(name = "REASON_")
    @Schema(description = "拒绝原因")
    private String reason;
	/**出入库类型*/
    @Column(name = "TYPE_")
    @Schema(description = "出入库类型")
    private Integer type;

	public EquipmentStockRejectHistory(String applyId, int type, String reason){
        this.isDel = 0;
        this.version = 0;
        this.applyId = applyId;
        this.reason = reason;
        this.type = type;
    }
}
